﻿namespace Entity.PointsActivety;

/// <summary>
/// 排队免单活动队列
/// </summary>
public class PointsActivityQueue : BaseEntity
{
    /// <summary>
    /// 商户编号
    /// </summary>
    public int StoreId { get; set; }

    /// <summary>
    /// 活动编号
    /// </summary>
    public int ActiveId { get; set; }

    /// <summary>
    /// 客户编号
    /// </summary>
    public int ClientId { get; set; }

    /// <summary>
    /// 排队序号
    /// </summary>
    public int Index { get; set; } = 1;

    /// <summary>
    /// 排队状态
    /// </summary>
    public ActiveState State { get; set; }

    /// <summary>
    /// 支付金额
    /// </summary>
    public decimal Price { get; set; }

    /// <summary>
    /// 奖池金额
    /// </summary>
    public decimal ActivePrice { get; set; }

    /// <summary>
    /// 商户金额
    /// </summary>
    public decimal StorePrice { get; set; }

    /// <summary>
    /// 客户信息
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(ClientId))]
    public Client? Client { get; set; }

    /// <summary>
    /// 活动信息
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(ActiveId))]
    public PointsActivity? Active { get; set; }

    /// <summary>
    /// 实际可领取现金金额
    /// </summary>
    public decimal RealPrice { get; set; }

    /// <summary>
    /// 商户信息
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(StoreId))]
    public Store? Store { get; set; }

    /// <summary>
    /// 客户领取时间
    /// </summary>
    public DateTime ResolveTime { get; set; }

    /// <summary>
    /// 退出备注
    /// </summary>
    public string? OutNotes { get; set; } = "";

}


/// <summary>
/// 
/// </summary>
public enum ActiveState
{
    /// <summary>
    /// 进行中
    /// </summary>
    进行中 = 0,

    /// <summary>
    /// 
    /// </summary>
    可领奖 = 3,

    /// <summary>
    /// 
    /// </summary>
    已领奖 = 4,

    /// <summary>
    /// 
    /// </summary>
    已退出
}